#!/bin/bash
# Lists $pkgname / directory name mismatches

base=${BASH_SOURCE[0]%/*}

cd "$base/../packages"

for p in * ; do (
	. "$p/PKGBUILD" 2> /dev/null || continue

	pkgname=${pkgbase:-$pkgname}

	if [[ "$pkgname" != "$p" ]] ; then
		echo "pkgname '$name' does not match directory '$p'"
	fi

	env -i PATH=/bin ../scripts/prep "$p/PKGBUILD" -n
) done
